﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace NewRetail.Application.Core.Entity
{
    public abstract class BaseEntityWithNo : BaseEntity
    {
        public string No { get; set; }
    }

    public interface IBaseEntity
    {
        string Id { get; }
        int? addUserID { get; set; }
        DateTime? addTime { get; set; }
        int? updateUserID { get; set; }
        DateTime? updateTime { get; set; }
    }

    public abstract class BaseEntity : Entity<string>, IBaseEntity
    {
        [Newtonsoft.Json.JsonIgnore()]
        [System.Text.Json.Serialization.JsonIgnore]
        public override string Id { get; protected set; }

        [Newtonsoft.Json.JsonProperty(nameof(Id))]
        [System.Text.Json.Serialization.JsonPropertyName(nameof(Id))]
        public virtual string _IdForSerialize { get => this.Id; set { this.Id = value; } }

        public virtual void SetId(string _id)
        {
            this.Id = _id;
        }

        public int? addUserID { get; set; }
        public DateTime? addTime { get; set; }
        public int? updateUserID { get; set; }
        public DateTime? updateTime { get; set; }
    }

    public interface IReceiptEntity : IEntity<string>
    {
        string receiptNo { get; set; }
        bool isAuditing { get; set; }
        string remark { get; set; }
        DateTime receiptDate { get; set; }
        int? operateUserID { get; set; }
        DateTime? operateTime { get; set; }
    }

    public interface IInOrOutEntity : IEntity<string>
    {
        int inOrOut { get; set; }
    }

    public interface IWarehouseEntity : IEntity
    {
        string warehouseID { get; set; }
    }
}
